

12/12/04

	"GnuPlot-Inteface-Example" shows how "C" can connect to GnuPlot.
	The example uses the "popen()" command to start "GnuPlot" in a backround
	shell. Commands are simply passed as "text", as if "GnuPlot" was open
	in a console window.


12/29/04

   "Application" directory is derived from "GnuPlot-Interface-Example"
   and contains various test algorythms for NURBS. Code contined in 
   this application is based on information obtained from "Some Mathematics
   For Advanced Graphics" in "Documents", file "advgraphnotes.html"

   "IntroToNurbs-Chap_3" and "IntroToNurbs-Chap_4" were obtained form
   example code downloaded from "An Introduction to NURBS" book
   shown in dirctory "Documents" file "nurbs.html". There are more
   code examples for this book, specificly NURB's surfaces examples.
   The only code built here was in "IntroToNurbs-Chap_4", "example3"
   which is initiated by file "trbsplin.cc". "IntroToNurbs-Chap_3"
   was only downloaded to extra files needed by "IntroToNurbs-Chap_4"
   examples.

   The code in "IntroToNurbs-Chap_4" could become the basis for
   the execution of "openNURBS" generated parameter templates
   explained in more detail below.

   
   **** ****
   The bulk of the discoveries here are the wealth of open source
   and private source projects relating to NURBS processing.

   "openNURBS" is a toolkit used to process ".3dm" files produced
   from CAD systems such as "Rhinoceros" with supports over
   400 companies that provide "plugins" for CAM (computer aided
   machining), notibly "RhinoCAM" and many others. It seems like
   what a lot of companies are doing here is using "Rhinoceros"
   as there CAD interface and adding features related to parts
   machining.





   It is important to what "openNURBS" is. It exists as project library
   for Microsoft VC6/7 and as a makefile for UNIX/Linux.
   It has various examples, as will be explained below.

   The purpose of the library is two fold. First, to convert 
   object descriptions that exist in "script" form to or from .3dm file
   objects. (see "example_read" and "example_write"
   directory, in XP machine backup __B-Splines__\OpenNurbs).

   Second to convert the .3dm objects to NURBS parameters and display
   these objects through an inteface provided by "OpenGL" (Windows) or
   "Mesa" (Linux). In fact, I believe "Rhinoceros" uses "OpenGL"
   (see  "example_gl" directory, in XP machine backup 
   __B-Splines__\OpenNurbs).The NURBS generation is done by OpenGL
   and Mesa.

   Mesa and OpenGL have an identical command interface.

   An interesting thing here is that "example_gl" has 
   a OpenGl function named "gluNurbsCurve()" that processes
   the NURBS parameters for "homogenious control points", knot vector
   ect...

   I also downloaded into "__B-Splines__\OpenNurbs" on the XP machine
   "gluNurbsCurve_ExampleCode.html" that shows how the NURB
   parameters relate to the function "gluNurbsCurve()" function.

   **** Here is an interesting IDEA!!!! ****

   Extract the vectors and parameters generated by "openNURBS"
   that is to be fed to "gluNurbsCurve()" in "example_gl"
   and apply them to the function in "IntroToNurbs-Chap_4" to
   be displayed in "GnuPlot".

   To do this, I am not going to spend the time porting 
   "openNURBS" over to the Linux machine. I will extract
   the points generated by the "circle" object in "my_curves.3dm"
   (see also example_write\example_write.cpp), and put them
   into the function in "IntroToNurbs-Chap_4".

   So, what is the idea here??? 

   Using "Rhinooceros" to generate CAD drawing that can be
   stored in .3dm format.
   Providing drivers that can generate realtime trajectorys
   from the broken down NURB parameters fed to "gluNurbsCurve()".

   Additional Notes:

   It would be interesting to see what is contained in Chapter 7
   (Rational B-splines (NURBS) Surfaces) of "An Introduction to NURBS" book
   shown in dirctory "Documents" file "nurbs.html", as
   applied to the "openNURBS" interface.

   One final note:

   In "example_write\example_write.cpp" of "__B-Splines__\OpenNurbs"
   on the XP machine, typical shapes like "circles" and "lines"
   are described at a very high level. However, the "wiggle"
   is almost explicitly described in NURB parameters. This emphizes
   the need to use "Rhinooceros" (and for that matter, OpenGL/Mesa
   and "de-emphizes" the role played by "openNURBS"



1/2/05


   Experimented with "rotation/translation" in "IntrToNurbs-Chap4"
   file trbsplin.cc (example3 executable). See reference document
   /Documents/opengl-notes-4.pdf.

   Some additional notes on "example3" project. 

                  - change all "float" variables to "double"
                    (also, see line 82 of file "rbspline.cc")

                  - Number of points limited by static 
                    allocations on the stack. (eg.,
                    variable b,h, and p in "main()").
                    All functions in this project
                    seem to need viewed for this problem.
                    (less obvious "x", "nbasis" in funcion
                     "rbspline()" of file "rbspline.cc")
                     
                  - This code is written for "open uniform"
                    knot vectors. It seems that (according to
                    various literature I reviewed), "non-
                    uniform" is not used generally.

                   - All code in "example3" follows the
                     the information provided in 
                     "advgraphnotes.html", section "B-splines"
                     in directory "Documents"


   I also found notes on "perspective" in 3-D but did not do any
   experiments on this. See the documents "viewingIn3d.pdf" and
   "Lecture_08-6.pdf" in directory "Documents".


   
1/20/05

   Loaded sample code for Nurb surfaces to "IntroToNurbs-Chap_7"
   (This is sample code for a book described in "nurbs.html" of
   /Documents subdirectory)

   I had to add the function "plot_xyz() to "gnuplot_i.cc" to
   get "Gnuplot" to show mesh surfaces.

   I found some additional documents for GnuPlot that better
   describe plotting mesh surfaces with "splot" (the manual 
   is not written very well)

   The are "multimsh.html" and "plot3d-3.html" in B-Splines
   directory.


1/22/05

   Finished experimentation on "IntroToNurbs-Chap_7" (example1).
   I have successfully generated a quarter "sphere" and (I think)
   figured out the necessary "weights" for the homogenious coordinates.

   As noted in "trbsurf.cc", accuracy of the "radius" of the sphere
   (and the circle for that matter) may depend on a higher order
   spline, which by definition will require more points to be defined.
   
   Or "order 3" may be all that is necessary, and simply an increase
   in the number of points will improve accuracy.

   As noted, increasing the number for "p1" and "p2" did not
   make much of a difference (and I don't think the fact
   that the algorythm is being calculated with "float" instead
   of "double" really a factor here)

   I think the determination of multiple points to define a portion
   of a circle (or sphere) is indeed based on the Bezier algorythm.

   Say for an arc struck between 0 and 30 degrees:

       - At 0 degree, draw a vertical line.

       - At 30 degrees, draw a line tangent to a circle at 30
         degrees.

       - The point at which these two lines intersect would
         be the control point for "k" (and "l") algorythm 
         of order "3" (like our examples)
         
       - If where a line from the the control point to the origin
         intersects the arc (in this case at 15 degrees), draw
         another line tangent to this point. 

       - This new tangent point defines the third point on the
         arc, and this line that intersects the first line
         (the tangent line at 0 degrees), and the second line
         (the tangent line at 30 degrees), defines two
         control points.

       - Now a total of 5 points define the arc. The three
         points that touch the arc have their homogenous 
         points defined as "1"

       - The homogenous points for the two control points
         that do not touch the arc are calculated in a
         manner similar to the "Circle" example described
         in "node5.html" of /Documents subdirectory.




1/23/05

        Some final notes here before I move on to other things.

        I have collected list of documents saved in \B-Splines\Documents
        that are worth noting.

        Before I do this however, it seems to me if a book on NURBS
        needs to be purchased, it should be the bool outlined in
        "nurbs.html" titled "An Introlduction to NURBS". 

        This is were most of the example source code was obtained.



        Documents in ths dirctory worth noting:

          - "numerica.html" provides a good explainion on the
            the simple forms of numerical intergration.
            (NOTE: this document can only be viewed on linux
                   with a Java plug-in for Monzila which I
                   do not have the time to download and
                   install. It ca be view with "Windows"
                   however)

            As descovered in the example under the subdirctory
            "\Application", "example.cc", it is relatively easy
            to find the derivative of the spline equation, but
            to use the result in a integration of the "Sum of squares
            square root" to determine the path lenght is next
            to impossible.
            
            This document decribes two simple methods, Trapezoidal
            and Simpson's method. (The simpliest form of numerical
            integration is "Riemien" sums)

          - A more complex form of numerical intergration belongs
            to a class of functions know as "Gauss" integration.

            The subdirectory ".\Documents\Gauss-Integration" has
            infomation on this. 

            A good example of this is "First Steps in Numerical
            Analysis-Guass.htm"
            
            Some example code for general "Guassian" integration
            methods can be found in "guassint.htm" and
            "First Steps in Numerical Analysis-Code.htm




        Documents in ".\Documents\NurbsNotes" worth noting:

           - RB-circles.html decribes how to determine the
             the "control" point for an arbitrary "arc"

           - A good explaination on "visualizing" homogeneous
             coordinates in explained in "homo-coor.html"

           - All other documents in this subdirectory should
             also be reviewed.

          

        Another document I found interesting is a technique
        to dynamicly determine the size of the  interval of 
        a given numerical integation algorythm by use of 
        "Romberg Integration" 
        See "romberg.pdf" and sample code "romberg.htm"


        Another document to read for general information on
        computer graphics using B-Splines is "LTU-CDUPP-0415-SE.pdf"


        Some documents on adjusting "perspective" in 3D-graphing
        can be found in "viewingIn3D.pdf" and "Lecture_08_6.pdf"



        FINALLY!!!

        ONE OF THE MOST IMPORTANT DOCUMENTS TO REVIEW IS
        THE DOCUMENT "MovingAtConstantSpeed.pdf"

        This document gives the methodogy in excuting
        a B-Spline trajectory in realtime where the
        path velocity can be maintained at contant
        speed.

        Numerical intergration is necassary to find
        the path length.

        This method would be fundimental in actually
        implementing a B-Spline motion trajectory.


        

        
         

       
       

   
   


 

   
   







